

// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 添加电子工单 */
export async function createWorkOrder(options) {
  return request<{
    data;
  }>('/api/mjWorkOrder/add', {
    method: 'POST',
    data:(options || {}),
  });
}

/** 删除电子工单 */
export async function deleteWorkOrder(options) {
    return request<{
      data;
    }>('/api/mjWorkOrder/delete', {
      method: 'GET',
      ...(options || {}),
    });
  }
  
  /** 电子工单列表 */
export async function fetchWorkOrderList(options) {
   const result = await request('/api/mjWorkOrder/queryByPage', {
      method: 'POST',
      data: options,
    });
    return { data: result.data.records, success: true,total:result.data.total }
  }
  
  /** 修改电子工单 */
export async function updateWorkOrder(options) {
    return request<{
      data;
    }>('/api/mjAboutUs/edit', {
      method: 'POST',
      data:(options || {}),
    });
  }

    /** 查询电子工单详情 */
export async function detailWorkOrder(options) {
    return request<{
      data;
    }>('/api/mjWorkOrder/detail', {
      method: 'GET',
      params:(options || {}),
    });
  }
// 电子工单回复接口
export async function replyWorkOrder(options) {
    return request<{
      data;
    }>('/api/mjWorkOrderDetail/add', {
      method: 'POST',
      data:(options || {}),
    });
  }